/*
 * @Author: 闫一丹 1437921153@qq.com
 * @Date: 2023-01-03 21:38:16
 * @LastEditors: 闫一丹 1437921153@qq.com
 * @LastEditTime: 2023-01-05 13:57:56
 * @FilePath: \team_program\router\chat.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/**
 * 获取加入的群聊列表
 */
const express = require('express')
// 创建路由对象
const router = express.Router()
// 导入验证数据合法性的中间件
const expressJoi = require('@escook/express-joi')
const chat_controller = require('../controller/chat')

// 导入需要的验证规则对象
const { add_chat_schema } = require('../schema/chat')

router.get('/chat', chat_controller.getMyChat)
router.get('/people', chat_controller.getMyChatPelple)
router.post('/addChat', expressJoi(add_chat_schema), chat_controller.addChat)


// 将路由对象共享出去
module.exports = router